import {
  upgrade
} from '../../api/groupOrder';
Component({

  properties: {
    orderData:{
      type: Object,
      value: '',
    },
    noDataImg: {
      type: String,
      value: '',
    },
    noDataText: {
      type: String,
      value: '暂无数据',
    },
    loading: {
      type: Boolean,
      value: false,
    },
  },
  data: {
    relationshipType:true,
    logo:'http://cdnx.rzico.com/upload/20200825/bbfaa50b-ab3d-4875-83ac-7c929976369e芸助手.png'
  },
  methods: {
    relationshipClick(){
      this.data.relationshipType = !this.data.relationshipType
      this.setData({
        relationshipType: this.data.relationshipType
      })
    },
    ticlick(){
      let params = {}
      params.groupOrderId = this.data.orderData.id
      ended(params).then(res=>{
        eeui.toast('提现成功')
        this.triggerEvent('loadList')
      })
    },
    upgradeclick(){
      upgrade({groupOrderId:this.data.orderData.id}).then(res=>{
        wx.showToast({
          icon: "none",
          title: '升级成功'
        })
        this.triggerEvent('loadList')
      }).catch(res=>{
      })
    }
  }
})
